/**
 *
 * 医疗服务指标点击模块
 * @Date: 2016-1-25
 * @author: Jackson wang
 * @version: 1.0
 * @since: 1.0
 *
 */
 
 define(["jquery","sysmanMain","valueUtil","baseMedical","antiMedical","antiDose","overlayPrescribe","basePatient","largeCost","largePositive",
 	"pathwayPatient", "singleEntityFee", "drugCounting", "raiseCharge", "overStandered", "billingByOne", "multiCheck", "duplicateCharge","drugPercent"],
		function($,sysmanMain,valueUtil,baseMedical,antiMedical,antiDose,overlayPrescribe,basePatient,largeCost,largePositive,
			pathwayPatient, singleEntityFee, drugCounting, raiseCharge, overStandered, billingByOne, multiCheck, duplicateCharge,drugPercent) {
	
			
	var config = {
		//dom根节点
		rootid : 'panel-chart-all div.medical-panel',
		
		//事件dom选择器
		selector: 'a.medical-indicate'
		
		
	}	
	
	var public_method = {
		
		/**
		 * @param _options.evt	事件对象
		 * @param _options.yearAndMonth	统计年月
		 */
		openPage:function(_options){
			if(window.console){
				console.info('medicalIndicate loaded and running ...')
			}
			var e = _options.evt
			if(e && e.currentTarget){
				var _t = e.currentTarget
				var _c = $(_t).attr('indicate');

				var oc = {
					monitor_year_month:_options.yearAndMonth,
					data_type:'2',
					patient_type:'1'
				}
				
				var zeroc = {
					monitor_year_month:_options.yearAndMonth
				}
				
				var ic = {
					monitor_year_month:_options.yearAndMonth,
					data_type:'2',
					patient_type:'2'
				}
				var ec = {
					monitor_year_month:_options.yearAndMonth,
					data_type:'2',
					patient_type:'3'
				}
				if(_c){
					switch(_c){
						case 'outpatient-num':
						//门诊人次
						private_method.openBasePatient(oc);
						break;
						case 'inpatient-out-num':
						//出院人次
						private_method.openBaseInPatient(ic);
						break;
						case 'outpatient_count_money':
						//门诊收入
						private_method.openBasePatient(oc);
						break;
						case 'inpatient_out_count_money':
						//出院病人收入
						private_method.openBaseInPatient(ic);
						break;
						case 'base-medical-outpatient':
						//门诊基药金额比例
						
						private_method.openBaseMedical(oc);
						
						break;
						case 'base-medical-inpatient':
						//住院基药金额比例
						private_method.openBaseMedical(ic);
						break;
						case 'outpatient-anti-use':
						//门诊抗菌药品使用率
						private_method.openAntiUse(oc);
						break;
						
						case 'inpatient-anti-use':
						//住院抗菌药物使用比例
						private_method.openAntiUse(ic);
						break;
						
						case 'outemrpatient-anti-use':
						private_method.openAntiUse(ec);
						break;
						case 'inpatient-ddd':
						//出院患者抗菌药物使用强度
						private_method.openAntiDose(ic);
						break;
						
						case 'overlay-prescribe':
						//超限处方
						private_method.openOverlayPrescribe(oc);
						break;
						
						case 'large-cost':
						//大额住院费用
						private_method.openLargeCost(ic);
						break;
						
						case 'medical_single_entity_fee':
						//大额住院费用
						private_method.openMedicalSingleEntityFee(ic);
						break;
						
						case 'large-positive':
						//大型检查阳性率
						private_method.openLargePositive(ic);
						break;
						
						case 'pathway-patient':
						//临床路径
						private_method.openPathwayPatient(ic);
						break;
						
						case 'drug_count':
						//药品排名
						private_method.durgCount(zeroc);
						break;
						
						case 'drug_percent':
						//药占比
						private_method.durgPercent(zeroc);
						break;
						
						case 'drug_sum':
						//药品用量排名
						private_method.durgCountDrug(zeroc);
						break;
						
						case 'drug_from':
						//临床路径
						private_method.durgCountFrom(zeroc);
						break;
						
						case 'drug_anti_sum':
						//抗菌药品用量排名
						private_method.durgCountAnti(zeroc);
						break;
						
						case 'drug_doct':
						//医生用药排名
						private_method.durgCountDoct(zeroc);
						break;
						
						case 'raise_charge':
						private_method.raiseCharge(zeroc);
						break;
						
						case 'over_standered':
						private_method.overStandered(zeroc);
						break;
						
						case 'duplicate_charge':
						//重复收费
						private_method.duplicateCharge(zeroc);
						break;
						
						case 'billing_by_one':
						//同一开单收费
						private_method.billingByOne(zeroc);
						break;
						
						case 'multicheck_by_one':
						//重复检查
						private_method.multiCheckByOne(zeroc);
						break;
						default:
						private_method.openOutpatientNum();
					}
				}
			}
		}
	}
	
	var private_method = {
		openLargePositive:function(_options){
			largePositive.openPage(_options)
		},
		openLargeCost:function(_options){
			largeCost.openPage(_options)
		},
		openMedicalSingleEntityFee:function(_options){
			singleEntityFee.openPage(_options)
		},
		openPathwayPatient:function(_options){
			pathwayPatient.openPage(_options)
		},
		openOutpatientNum:function(_options){
			
		},
		openBaseMedical:function(_options){
			baseMedical.openPage(_options)			
		},
		raiseCharge:function(_options){
			raiseCharge.openPage(_options)
		},
		overStandered:function(_options){
			overStandered.openPage(_options)
		},
		duplicateCharge:function(_options){
			duplicateCharge.openPage(_options)
		},
		billingByOne:function(_options){
			billingByOne.openPage(_options)
		},
		multiCheckByOne:function(_options){
			multiCheck.openPage(_options)
		},
		durgCountDrug:function(_options){
			drugCounting.openPageDrug(_options)
		},
		durgCountDoct:function(_options){
			drugCounting.openPageDoct(_options)
		},
		//药品排名统计
		durgCount:function(_options){
			drugCounting.openPageDrug(_options)
		},
		
		//药占比统计
		durgPercent:function(_options){
			drugPercent.openPagePercent(_options)
		},
		durgCountDept:function(_options){
			drugCounting.openPageDept(_options)
		},
		durgCountAnti:function(_options){
			drugCounting.openPageAnti(_options)
		},
		durgCountFrom:function(_options){
			drugCounting.openPageFrom(_options)
		},
		openAntiUse:function(_options){
			antiMedical.openPage(_options)
		},
		openAntiDose:function(_options){
			antiDose.openPage(_options)
		}
		,
		openOverlayPrescribe:function(_options){
			overlayPrescribe.openPage(_options)
		}
		,
		openBasePatient:function(_options){
			basePatient.openPage(_options)
		}
		,
		openBaseInPatient:function(_options){
			basePatient.openInpatientPage(_options)
		}
	}
	return public_method;
})